Optimal. Leaf size=116 \[ -\frac {x^2}{180 a^2}-\frac {x^4}{60}+\frac {x \tanh ^{-1}(a x)}{6 a^3}+\frac {x^3 \tanh ^{-1}(a x)}{18 a}-\frac {1}{15} a x^5 \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{12 a^4}+\frac {1}{4} x^4 \tanh ^{-1}(a x)^2-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2+\frac {7 \log \left (1-a^2 x^2\right )}{90 a^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.33, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps
used = 26, number of rules used = 8, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6161, 6037,
6127, 272, 45, 6021, 266, 6095} \begin {gather*} -\frac {\tanh ^{-1}(a x)^2}{12 a^4}+\frac {x \tanh ^{-1}(a x)}{6 a^3}-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2-\frac {x^2}{180 a^2}+\frac {7 \log \left (1-a^2 x^2\right )}{90 a^4}-\frac {1}{15} a x^5 \tanh ^{-1}(a x)+\frac {1}{4} x^4 \tanh ^{-1}(a x)^2+\frac {x^3 \tanh ^{-1}(a x)}{18 a}-\frac {x^4}{60} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 266
Rule 272
Rule 6021
Rule 6037
Rule 6095
Rule 6127
Rule 6161
Rubi steps
\begin {align*} \int x^3 \left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2 \, dx &=-\left (a^2 \int x^5 \tanh ^{-1}(a x)^2 \, dx\right )+\int x^3 \tanh ^{-1}(a x)^2 \, dx\\ &=\frac {1}{4} x^4 \tanh ^{-1}(a x)^2-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2-\frac {1}{2} a \int \frac {x^4 \tanh ^{-1}(a x)}{1-a^2 x^2} \, dx+\frac {1}{3} a^3 \int \frac {x^6 \tanh ^{-1}(a x)}{1-a^2 x^2} \, dx\\ &=\frac {1}{4} x^4 \tanh ^{-1}(a x)^2-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2+\frac {\int x^2 \tanh ^{-1}(a x) \, dx}{2 a}-\frac {\int \frac {x^2 \tanh ^{-1}(a x)}{1-a^2 x^2} \, dx}{2 a}-\frac {1}{3} a \int x^4 \tanh ^{-1}(a x) \, dx+\frac {1}{3} a \int \frac {x^4 \tanh ^{-1}(a x)}{1-a^2 x^2} \, dx\\ &=\frac {x^3 \tanh ^{-1}(a x)}{6 a}-\frac {1}{15} a x^5 \tanh ^{-1}(a x)+\frac {1}{4} x^4 \tanh ^{-1}(a x)^2-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2-\frac {1}{6} \int \frac {x^3}{1-a^2 x^2} \, dx+\frac {\int \tanh ^{-1}(a x) \, dx}{2 a^3}-\frac {\int \frac {\tanh ^{-1}(a x)}{1-a^2 x^2} \, dx}{2 a^3}-\frac {\int x^2 \tanh ^{-1}(a x) \, dx}{3 a}+\frac {\int \frac {x^2 \tanh ^{-1}(a x)}{1-a^2 x^2} \, dx}{3 a}+\frac {1}{15} a^2 \int \frac {x^5}{1-a^2 x^2} \, dx\\ &=\frac {x \tanh ^{-1}(a x)}{2 a^3}+\frac {x^3 \tanh ^{-1}(a x)}{18 a}-\frac {1}{15} a x^5 \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{4 a^4}+\frac {1}{4} x^4 \tanh ^{-1}(a x)^2-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2-\frac {1}{12} \text {Subst}\left (\int \frac {x}{1-a^2 x} \, dx,x,x^2\right )+\frac {1}{9} \int \frac {x^3}{1-a^2 x^2} \, dx-\frac {\int \tanh ^{-1}(a x) \, dx}{3 a^3}+\frac {\int \frac {\tanh ^{-1}(a x)}{1-a^2 x^2} \, dx}{3 a^3}-\frac {\int \frac {x}{1-a^2 x^2} \, dx}{2 a^2}+\frac {1}{30} a^2 \text {Subst}\left (\int \frac {x^2}{1-a^2 x} \, dx,x,x^2\right )\\ &=\frac {x \tanh ^{-1}(a x)}{6 a^3}+\frac {x^3 \tanh ^{-1}(a x)}{18 a}-\frac {1}{15} a x^5 \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{12 a^4}+\frac {1}{4} x^4 \tanh ^{-1}(a x)^2-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2+\frac {\log \left (1-a^2 x^2\right )}{4 a^4}+\frac {1}{18} \text {Subst}\left (\int \frac {x}{1-a^2 x} \, dx,x,x^2\right )-\frac {1}{12} \text {Subst}\left (\int \left (-\frac {1}{a^2}-\frac {1}{a^2 \left (-1+a^2 x\right )}\right ) \, dx,x,x^2\right )+\frac {\int \frac {x}{1-a^2 x^2} \, dx}{3 a^2}+\frac {1}{30} a^2 \text {Subst}\left (\int \left (-\frac {1}{a^4}-\frac {x}{a^2}-\frac {1}{a^4 \left (-1+a^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=\frac {x^2}{20 a^2}-\frac {x^4}{60}+\frac {x \tanh ^{-1}(a x)}{6 a^3}+\frac {x^3 \tanh ^{-1}(a x)}{18 a}-\frac {1}{15} a x^5 \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{12 a^4}+\frac {1}{4} x^4 \tanh ^{-1}(a x)^2-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2+\frac {2 \log \left (1-a^2 x^2\right )}{15 a^4}+\frac {1}{18} \text {Subst}\left (\int \left (-\frac {1}{a^2}-\frac {1}{a^2 \left (-1+a^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=-\frac {x^2}{180 a^2}-\frac {x^4}{60}+\frac {x \tanh ^{-1}(a x)}{6 a^3}+\frac {x^3 \tanh ^{-1}(a x)}{18 a}-\frac {1}{15} a x^5 \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{12 a^4}+\frac {1}{4} x^4 \tanh ^{-1}(a x)^2-\frac {1}{6} a^2 x^6 \tanh ^{-1}(a x)^2+\frac {7 \log \left (1-a^2 x^2\right )}{90 a^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 88, normalized size = 0.76 \begin {gather*} -\frac {a^2 x^2+3 a^4 x^4+2 a x \left (-15-5 a^2 x^2+6 a^4 x^4\right ) \tanh ^{-1}(a x)+15 \left (1-3 a^4 x^4+2 a^6 x^6\right ) \tanh ^{-1}(a x)^2-14 \log \left (1-a^2 x^2\right )}{180 a^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.43, size = 182, normalized size = 1.57
method | result | size |
derivativedivides | \(\frac {-\frac {\arctanh \left (a x \right )^{2} a^{6} x^{6}}{6}+\frac {a^{4} x^{4} \arctanh \left (a x \right )^{2}}{4}-\frac {\arctanh \left (a x \right ) a^{5} x^{5}}{15}+\frac {a^{3} x^{3} \arctanh \left (a x \right )}{18}+\frac {a x \arctanh \left (a x \right )}{6}+\frac {\arctanh \left (a x \right ) \ln \left (a x -1\right )}{12}-\frac {\arctanh \left (a x \right ) \ln \left (a x +1\right )}{12}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{24}+\frac {\ln \left (a x -1\right )^{2}}{48}-\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{24}+\frac {\ln \left (a x +1\right )^{2}}{48}-\frac {a^{4} x^{4}}{60}-\frac {a^{2} x^{2}}{180}+\frac {7 \ln \left (a x -1\right )}{90}+\frac {7 \ln \left (a x +1\right )}{90}}{a^{4}}\) | \(182\) |
default | \(\frac {-\frac {\arctanh \left (a x \right )^{2} a^{6} x^{6}}{6}+\frac {a^{4} x^{4} \arctanh \left (a x \right )^{2}}{4}-\frac {\arctanh \left (a x \right ) a^{5} x^{5}}{15}+\frac {a^{3} x^{3} \arctanh \left (a x \right )}{18}+\frac {a x \arctanh \left (a x \right )}{6}+\frac {\arctanh \left (a x \right ) \ln \left (a x -1\right )}{12}-\frac {\arctanh \left (a x \right ) \ln \left (a x +1\right )}{12}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{24}+\frac {\ln \left (a x -1\right )^{2}}{48}-\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{24}+\frac {\ln \left (a x +1\right )^{2}}{48}-\frac {a^{4} x^{4}}{60}-\frac {a^{2} x^{2}}{180}+\frac {7 \ln \left (a x -1\right )}{90}+\frac {7 \ln \left (a x +1\right )}{90}}{a^{4}}\) | \(182\) |
risch | \(-\frac {\left (2 a^{6} x^{6}-3 a^{4} x^{4}+1\right ) \ln \left (a x +1\right )^{2}}{48 a^{4}}+\frac {\left (30 a^{6} x^{6} \ln \left (-a x +1\right )-12 a^{5} x^{5}-45 x^{4} \ln \left (-a x +1\right ) a^{4}+10 a^{3} x^{3}+30 a x +15 \ln \left (-a x +1\right )\right ) \ln \left (a x +1\right )}{360 a^{4}}-\frac {\ln \left (-a x +1\right )^{2} a^{2} x^{6}}{24}+\frac {a \,x^{5} \ln \left (-a x +1\right )}{30}+\frac {x^{4} \ln \left (-a x +1\right )^{2}}{16}-\frac {x^{4}}{60}-\frac {x^{3} \ln \left (-a x +1\right )}{36 a}-\frac {x^{2}}{180 a^{2}}-\frac {x \ln \left (-a x +1\right )}{12 a^{3}}-\frac {\ln \left (-a x +1\right )^{2}}{48 a^{4}}+\frac {7 \ln \left (a^{2} x^{2}-1\right )}{90 a^{4}}-\frac {1}{2160 a^{4}}\) | \(223\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 146, normalized size = 1.26 \begin {gather*} -\frac {1}{180} \, a {\left (\frac {2 \, {\left (6 \, a^{4} x^{5} - 5 \, a^{2} x^{3} - 15 \, x\right )}}{a^{4}} + \frac {15 \, \log \left (a x + 1\right )}{a^{5}} - \frac {15 \, \log \left (a x - 1\right )}{a^{5}}\right )} \operatorname {artanh}\left (a x\right ) - \frac {1}{12} \, {\left (2 \, a^{2} x^{6} - 3 \, x^{4}\right )} \operatorname {artanh}\left (a x\right )^{2} - \frac {12 \, a^{4} x^{4} + 4 \, a^{2} x^{2} + 2 \, {\left (15 \, \log \left (a x - 1\right ) - 28\right )} \log \left (a x + 1\right ) - 15 \, \log \left (a x + 1\right )^{2} - 15 \, \log \left (a x - 1\right )^{2} - 56 \, \log \left (a x - 1\right )}{720 \, a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 109, normalized size = 0.94 \begin {gather*} -\frac {12 \, a^{4} x^{4} + 4 \, a^{2} x^{2} + 15 \, {\left (2 \, a^{6} x^{6} - 3 \, a^{4} x^{4} + 1\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )^{2} + 4 \, {\left (6 \, a^{5} x^{5} - 5 \, a^{3} x^{3} - 15 \, a x\right )} \log \left (-\frac {a x + 1}{a x - 1}\right ) - 56 \, \log \left (a^{2} x^{2} - 1\right )}{720 \, a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.75, size = 114, normalized size = 0.98 \begin {gather*} \begin {cases} - \frac {a^{2} x^{6} \operatorname {atanh}^{2}{\left (a x \right )}}{6} - \frac {a x^{5} \operatorname {atanh}{\left (a x \right )}}{15} + \frac {x^{4} \operatorname {atanh}^{2}{\left (a x \right )}}{4} - \frac {x^{4}}{60} + \frac {x^{3} \operatorname {atanh}{\left (a x \right )}}{18 a} - \frac {x^{2}}{180 a^{2}} + \frac {x \operatorname {atanh}{\left (a x \right )}}{6 a^{3}} + \frac {7 \log {\left (x - \frac {1}{a} \right )}}{45 a^{4}} - \frac {\operatorname {atanh}^{2}{\left (a x \right )}}{12 a^{4}} + \frac {7 \operatorname {atanh}{\left (a x \right )}}{45 a^{4}} & \text {for}\: a \neq 0 \\0 & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 522 vs.
\(2 (98) = 196\).
time = 0.40, size = 522, normalized size = 4.50 \begin {gather*} -\frac {1}{45} \, {\left (\frac {15 \, {\left (\frac {3 \, {\left (a x + 1\right )}^{4}}{{\left (a x - 1\right )}^{4}} + \frac {2 \, {\left (a x + 1\right )}^{3}}{{\left (a x - 1\right )}^{3}} + \frac {3 \, {\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}}\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )^{2}}{\frac {{\left (a x + 1\right )}^{6} a^{5}}{{\left (a x - 1\right )}^{6}} - \frac {6 \, {\left (a x + 1\right )}^{5} a^{5}}{{\left (a x - 1\right )}^{5}} + \frac {15 \, {\left (a x + 1\right )}^{4} a^{5}}{{\left (a x - 1\right )}^{4}} - \frac {20 \, {\left (a x + 1\right )}^{3} a^{5}}{{\left (a x - 1\right )}^{3}} + \frac {15 \, {\left (a x + 1\right )}^{2} a^{5}}{{\left (a x - 1\right )}^{2}} - \frac {6 \, {\left (a x + 1\right )} a^{5}}{a x - 1} + a^{5}} + \frac {{\left (\frac {45 \, {\left (a x + 1\right )}^{3}}{{\left (a x - 1\right )}^{3}} - \frac {25 \, {\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} + \frac {35 \, {\left (a x + 1\right )}}{a x - 1} - 7\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )}{\frac {{\left (a x + 1\right )}^{5} a^{5}}{{\left (a x - 1\right )}^{5}} - \frac {5 \, {\left (a x + 1\right )}^{4} a^{5}}{{\left (a x - 1\right )}^{4}} + \frac {10 \, {\left (a x + 1\right )}^{3} a^{5}}{{\left (a x - 1\right )}^{3}} - \frac {10 \, {\left (a x + 1\right )}^{2} a^{5}}{{\left (a x - 1\right )}^{2}} + \frac {5 \, {\left (a x + 1\right )} a^{5}}{a x - 1} - a^{5}} + \frac {\frac {7 \, {\left (a x + 1\right )}^{3}}{{\left (a x - 1\right )}^{3}} - \frac {2 \, {\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} + \frac {7 \, {\left (a x + 1\right )}}{a x - 1}}{\frac {{\left (a x + 1\right )}^{4} a^{5}}{{\left (a x - 1\right )}^{4}} - \frac {4 \, {\left (a x + 1\right )}^{3} a^{5}}{{\left (a x - 1\right )}^{3}} + \frac {6 \, {\left (a x + 1\right )}^{2} a^{5}}{{\left (a x - 1\right )}^{2}} - \frac {4 \, {\left (a x + 1\right )} a^{5}}{a x - 1} + a^{5}} + \frac {7 \, \log \left (-\frac {a x + 1}{a x - 1} + 1\right )}{a^{5}} - \frac {7 \, \log \left (-\frac {a x + 1}{a x - 1}\right )}{a^{5}}\right )} a \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.98, size = 101, normalized size = 0.87 \begin {gather*} -\frac {a^2\,x^2-14\,\ln \left (a^2\,x^2-1\right )+3\,a^4\,x^4+15\,{\mathrm {atanh}\left (a\,x\right )}^2-10\,a^3\,x^3\,\mathrm {atanh}\left (a\,x\right )+12\,a^5\,x^5\,\mathrm {atanh}\left (a\,x\right )-30\,a\,x\,\mathrm {atanh}\left (a\,x\right )-45\,a^4\,x^4\,{\mathrm {atanh}\left (a\,x\right )}^2+30\,a^6\,x^6\,{\mathrm {atanh}\left (a\,x\right )}^2}{180\,a^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________